cmake_minimum_required(VERSION 2.8.7)

project(Kontrol)

find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

set(SOURCES
  Gorselleyici.cpp
  AnaPencere.cpp
  main.cpp
)
set(HEADERS
  Gorselleyici.h
  AnaPencere.h
)
set(MOC
  AnaPencere.h
)
set(UI AnaPencere.ui)

# Qt Preprocessing
qt4_wrap_cpp(MOC_GENERATED ${MOC})
qt4_wrap_ui(UI_GENERATED ${UI})
#qt4_add_resources(RCC_GENERATED ${RCC})

# File Filters
#source_group("Resource Files" FILES ${RCC} )
source_group("Form Files" FILES ${UI} )
source_group("Generated Files" FILES ${MOC_GENERATED} ${UI_GENERATED} )

# Include Dirs
include_directories(${KONTROL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

# Application
add_executable(Kontrol ${SOURCES} ${HEADERS} ${MOC_GENERATED} ${UI_GENERATED})

# Add debug postfix for debug builds
set_property(TARGET Kontrol PROPERTY DEBUG_POSTFIX -d)

# Libraries
# target_link_libraries(Kontrol Iletisim Gosterim ${QT_LIBRARIES})
target_link_libraries(Kontrol Gosterim Ortak ${QT_LIBRARIES})

# Install
install(TARGETS Kontrol RUNTIME DESTINATION bin)
